package com.leenmvc.core.utils.thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * 线程池工具类
 */
public class ThreadPoolUtil {

    /**
     * 定长线程池
     */
    private static ExecutorService thread = Executors.newFixedThreadPool(10);

    /**
     * 接收Runnable并执行
     *
     * @param runnable
     */
    public static void run(Runnable runnable) {
        thread.execute(runnable);
    }

}
